package com.xposed.aliproxy.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.xposed.aliproxy.R;
import com.xposed.aliproxy.db.DBUtil;

import java.util.ArrayList;

public class HistoryActivity extends BaseActivity {
    /* renamed from: b */
    private ListView f1895b;

    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setTitleStr("交易记录");
        this.f1895b = (ListView) findViewById(R.id.history_listview);
        final ArrayList<String> a = DBUtil.getInstance(this.context).queryAlitrade();
        this.f1895b.setAdapter(new ArrayAdapter(this.context, R.layout.view_historylist_item, a));
        this.f1895b.setOnItemClickListener(new OnItemClickListener() {
            public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
                String str = (String) a.get(i);
                Intent intent = new Intent(HistoryActivity.this.context, HistoryDetailActivity.class);
                intent.putExtra("localDate", str);
                HistoryActivity.this.startActivity(intent);
            }
        });
    }

    @Override
    public void loadLayout() {
        setContentView(R.layout.activity_history);
    }
}
